package com.niiwoo.civet.scheduler.trigger;

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.account.service.recharge.RechargeDubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by lujing on 2017/12/5.
 */
@Component
public class RechargeUpdateOrderJobTrigger {
    private static final Logger logger = LoggerFactory.getLogger(RechargeUpdateOrderJobTrigger.class);


    @Reference(version = "1.0.0")
    private RechargeDubboService rechargeDubboService;

    @Scheduled(cron = "${recharge.update-recharge-order}")
    public void updateRechargeOrder(){
        logger.info("更新充值订单的job");
        rechargeDubboService.queryOrderByStatusUpdate();
    }


}
